﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HigLabo.WindowsAzure.RestService.Extensions;

namespace HigLabo.WindowsAzure.RestService.ServiceManagement
{
    public class ListStorageAccountsResult : ManagementServiceResult
    {
        public List<StorageService> StorageServices { get; private set; }
        protected override void LoadBody()
        {
            StorageServices = new List<StorageService>();
            var root = BodyXml.Root;
            var l = root.ElementsByLocalName(StorageService.ElementName);
            foreach (var item in l)
            {
                var el = item;
                var add = new StorageService(el);
                StorageServices.Add(add);
            }
        }
    }
}
